package com.hitfm.iplay;

import android.app.Application;
import android.database.Cursor;

import com.hitfm.iplay.tab.AnimationTabHost;

public class MusicPlayerApp extends Application {
	private MusicInfoController mMusicInfoController = null;
	private AnimationTabHost mTabHost=null;
	private Cursor mCursor = null;

	public void onCreate() {
		super.onCreate();

		mMusicInfoController = MusicInfoController.getInstance(this);
	}
	
	public MusicInfoController getMusicInfoController() {
		return mMusicInfoController;
	}

	public AnimationTabHost getTabHost() {
		return mTabHost;
	}

	public void setTabHost(AnimationTabHost mTabHost) {
		this.mTabHost = mTabHost;
	}

	public Cursor getCursor() {
		return mCursor;
	}

	public void setCursor(Cursor mCursor) {
		this.mCursor = mCursor;
	}
	
	public void initCursor(){
		mCursor=mMusicInfoController.getAllSongs();
	}
	
	public void closeCursor(){
		if (mCursor!=null) {
			mCursor.close();
		}
	}

}
